package hz.mobileproject.pda.model.attendancemanager.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import org.xutils.view.annotation.ViewInject;

import hz.mobileproject.pda.R;
import hz.mobileproject.pda.model.attendancemanager.bean.ItemAbroadLv;
import hz.mobileproject.pda.ui.base.BaseCustomAdapter;

public class GoAbroadLvAdapter extends BaseCustomAdapter<ItemAbroadLv,GoAbroadLvAdapter.VH> {


    public GoAbroadLvAdapter(Context mContext) {
        super(mContext);
    }

    @Override
    protected int bindView() {
        return R.layout.item_outgoing_lv;
    }

    @Override
    protected VH createViewHolder() {
        return new VH();
    }

    @Override
    protected void bindData(int position, View convertView, VH vh) {
        ItemAbroadLv itemOutgoingLv = mList.get(position);
        vh.tv_police_name.setText(itemOutgoingLv.getPoliceName());
        vh.tv_police_dept.setText(itemOutgoingLv.getPoliceDept());
        vh.tv_police_work.setText(itemOutgoingLv.getPoliceWork());
        vh.tv_outgoing_reason.setText(itemOutgoingLv.getOutgoingReason());
    }

    class VH{
        @ViewInject(R.id.tv_police_name)
        private TextView tv_police_name;
        @ViewInject(R.id.tv_police_dept)
        private TextView tv_police_dept;
        @ViewInject(R.id.tv_police_work)
        private TextView tv_police_work;
        @ViewInject(R.id.tv_outgoing_reason)
        private TextView tv_outgoing_reason;
        @ViewInject(R.id.tv_outgoing_begin_time)
        private TextView tv_outgoing_begin_time;
        @ViewInject(R.id.tv_outgoing_end_time)
        private TextView tv_outgoing_end_time;
        @ViewInject(R.id.tv_outgoing_back_time)
        private TextView tv_outgoing_back_time;
        @ViewInject(R.id.tv_outgoing_day_count)
        private TextView tv_outgoing_day_count;
        @ViewInject(R.id.tv_outgoing_state)
        private TextView tv_outgoing_state;
    }
}
